home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #3 / Amiga Plus CD - 2002 - No. 03.iso / AmiSoft / Dev / Gui / Cit.lha / CIT / citra / CITPopUpWindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  2003-02-13  |  2.2 KB  |  86 lines

  1. //
  2. //                     CITPopUpWindow include
  3. //
  4. //                             StormC
  5. //
  6. //                       version 2003.02.12
  7. //
  8.  
  9.  
  10. #ifndef CITPOPUPWINDOW_H
  11. #define CITPOPUPWINDOW_H TRUE
  12.  
  13.  
  14. #include "CITGroup.h"
  15. #include "CITButton.h"
  16.  
  17. class CITPopUpWindow:public CITWindow
  18. {
  19.   public:
  20.     CITPopUpWindow();
  21.  
  22.     void CloseGadget(BOOL b =TRUE);
  23.     
  24.     void InsObject(CITWindowClass &winClass,BOOL &Err)
  25.       {infoGroup.InsObject(winClass,Err);}
  26.       
  27.     void InsAcceptButton(BOOL& Err);
  28.     void InsAcceptButton(char* t,BOOL& Err);
  29.     void InsCancelButton(BOOL& Err);
  30.     void InsCancelButton(char* t,BOOL& Err);
  31.  
  32.     void AcceptText(char* t) {acceptButton.Text(t);}
  33.     void AcceptMaxWidth(int w) {acceptButton.MaxWidth(w);}
  34.     void AcceptMinWidth(int w) {acceptButton.MinWidth(w);}
  35.     void AcceptMaxHeight(int h) {acceptButton.MaxHeight(h);}
  36.     void AcceptMinHeight(int h) {acceptButton.MinHeight(h);}
  37.     void AcceptWeightedWidth(int w) {acceptButton.WeightedWidth(w);}
  38.     void AcceptWeightedHeight(int h) {acceptButton.WeightedHeight(h);}
  39.  
  40.     void CancelText(char* t) {cancelButton.Text(t);}
  41.     void CancelMaxWidth(int w) {cancelButton.MaxWidth(w);}
  42.     void CancelMinWidth(int w) {cancelButton.MinWidth(w);}
  43.     void CancelMaxHeight(int h) {cancelButton.MaxHeight(h);}
  44.     void CancelMinHeight(int h) {cancelButton.MinHeight(h);}
  45.     void CancelWeightedWidth(int w) {cancelButton.WeightedWidth(w);}
  46.     void CancelWeightedHeight(int h) {cancelButton.WeightedHeight(h);}
  47.  
  48.   protected:
  49.     virtual void closeEvent();
  50.     virtual void acceptEvent(ULONG Id,ULONG eventFlag);
  51.     virtual void cancelEvent(ULONG Id,ULONG eventFlag);
  52.  
  53.     CITVGroup  mainGroup;
  54.     CITGroup   infoGroup;
  55.     CITHGroup  buttonGroup;
  56.     CITButton  acceptButton;
  57.     CITButton  cancelButton;
  58.  
  59.   private:
  60.     void  _closeEvent();
  61.     void  _acceptEvent(ULONG Id,ULONG eventFlag);
  62.     void  _cancelEvent(ULONG Id,ULONG eventFlag);
  63.  
  64.     ULONG Flags;
  65. };
  66.  
  67. //
  68. // Flags
  69. //
  70. #define INCLUDEACCEPT (1<<0)
  71. #define INCLUDECANCEL (1<<1)
  72.  
  73. //
  74. // Stop codes
  75. //
  76. #define POPUP_CLOSE  (1<<1)
  77. #define POPUP_ACCEPT (1<<2)
  78. #define POPUP_CANCEL (1<<3)
  79.  
  80. enum
  81. {
  82.   POPUPWINDOWCLASS_FLAGBITUSED = WINCLASS_FLAGBITUSED
  83. };
  84.  
  85. #endif // CITPOPUPWINDOW_H
  86.